#ifndef SEND_XML_IMPL_H
#define SEND_XML_IMPL_H

#include "send_impl.h"

#include <string>
#include <utility>
#include <list>

using namespace std;

namespace network {
	class send_xml_impl : public network::send_impl {
	public:
		send_xml_impl(): _is_single(false) {}
		~send_xml_impl() {}

		virtual void create_open_object(const string &name);
		virtual void create_close_object(const string &name);
		virtual void create_single_object(const string &name);
		virtual void create_attrib(const string &name, 
					   const string &val);

		virtual const string& get_header() const;
		virtual const string& get_footer() const;

		virtual boost::shared_ptr<send_impl> clone() const;
	private:
		string _header;
		list<std::pair<string, string> > _attrib;
		string _footer;
		bool _is_single;
		
		mutable string _all;
	};
}

#endif
